package ink.yql.dao;

import ink.yql.model.Team;
import org.apache.ibatis.annotations.*;

@Mapper
public interface TeamDao {
    @Select("select * from team where tid = #{tid}")
    Team getByTid(@Param("tid") Integer tid);

    @Select("select  * from team where pid = #{pid}")
    Team getByPid(@Param("pid") Integer pid);

    @Insert("insert into team (pid,tqq,tmail,tinternetSite) values" +
              " (#{pid},#{tqq},#{tmail} ,#{tinternetSite} )")
    Integer addOne(Team team);

    @Delete("delete from team where tid = #{tid}")
    Integer deleteByTid(@Param("tid") Integer tid);

    @Delete("delete from team where pid = #{pid}")
    Integer deleteByPid(@Param("pid") Integer pid);
}
